using CLELCore.Collections;

namespace CLELCore.Assembly
{
	public class USStream
	{
		private Heap _us;

		public int Size
		{
			get
			{
				return _us.Size;
			}
		}

		public USStream()
		{
			_us = new Heap();
		}

		public int Add(byte [] str)
		{
			int off = _us.Malloc(str.Length);
			_us.Set(off,str);
			return off;
		}
		
		public void Free(int off)
		{
			_us.Free(off);
		}

		public int[][] Compress()
		{
			return _us.Compress();
		}

		public byte[] Get(int off)
		{
			return _us.Get(off);
		}
	}
}
